package at.ac.univie.zsu.aguataplan.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;

/**
 * @author gerry
 * 
 */
@Entity
public class EventAttributeValueInteger extends EventAttributeValue {

	@NotNull
	@Column
	private int attValue;

	// ----------------------------------------------------
	// CONSTRUCTOR
	// ----------------------------------------------------

	public EventAttributeValueInteger() {

	}

	// ----------------------------------------------------
	// COMPARABLE
	// ----------------------------------------------------

	@Override
	public int compareTo(EventAttributeValue o) {
		// TODO: add compareTo statement
		return -1;
	}

	// ----------------------------------------------------
	// METHODS
	// ----------------------------------------------------

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("AttValue: ").append(getAttValue()).append(", ");
		sb.append("Id: ").append(getId()).append(", ");
		sb.append("RefAttribute: ").append(getRefEventAttribute() == null ? "null" : getRefEventAttribute().size())
				.append(", ");
		sb.append("RefDetectedEvent: ").append(getRefDetectedEvent()).append(", ");
		sb.append("Version: ").append(getVersion());
		return sb.toString();
	}

	// ----------------------------------------------------
	// GETTER & SETTER
	// ----------------------------------------------------

	public int getAttValue() {
		return attValue;
	}

	public void setAttValue(int attValue) {
		this.attValue = attValue;
	}

}
